from math import cos, sin, pi
from scipy.integrate import quad

def func(x):
    if 0 <= x <=1:
        return 2 *x
    else:
        return 5

if __name__ == '__main__':
    solution = quad(func, 0, 2)
    print(solution)


